@import "base.scss";

body{
  background: #efefef;
}

.root-view, div[data-page=dashboard]{
  width: 100%;
  height: 100%;
  position: relative;
}
div[data-page=dashboard] {
  overflow: hidden;
}
div[data-reactroot] {
  width: 100%;
  height: 100%;
}
div[data-page=login], div[data-page=register], div[data-page=forget] {
  .t-line{
    height: 4px;
    background: #44b549;
  }

  .container {
    width: 386px;
    margin: 200px auto 0;

    .title {
      color: #747474;
      font-family: "宋体";
      font-size: 30px;
      text-align: center;
    }

    .panel {
      padding: 16px 30px;
      margin-top: 45px;
      background: #fff;
      border-radius: 2px;
      box-shadow: -4px 0 4px #e9e9e9,
        -4px 0 4px #e9e9e9,
        0 -4px 4px #e9e9e9,
        0 8px 8px #dedede;

        .tabs ul{
          list-style: none;
          li {
            position: relative;
            width: 49.4%;
            display: inline-block;
            font-size: 16px;
            text-align: center;
            cursor: pointer;

            span{
              display: inline-block;
              padding: 6px 2px;
              border-bottom: 2px solid transparent;
            }
          }
          li[data-active=true] {
            cursor: inherit;

            span{
              color: $color-btn;
              border-bottom-color: $color-btn;
            }
          }
          li:first-child::after {
            content: ' ';
            position: absolute;
            right: -1px;
            top: 12px;
            height: 12px;
            border-right: 1px solid #dedede;
          }
        }

        .forget {
          float: right;
        }
    }
  }

}

div[data-page=register] {
  .t-line{
    height: 50px;
    background: #2dbe60;
    border-bottom: 1px solid #259d4f;

    button.go-login{
      float: right;
      margin: 13px 30px 0 0;
      color: #fff;
      vertical-align: middle;
      background: transparent;
    }
  }
  .container {
    width: 800px;
    margin: 30px auto 0;

    .panel {
      padding: 6px 16px 16px;
      margin-top: 0;

      .tabs ul{
        li {
          width: auto;
          padding: 0 14px;
          font-size: 18px;
          text-align: left;
        }
        li:first-child::after {
          height: 18px;
        }
      }
    }
  }
  
}

div[data-page=forget] {
  .container {

    .panel {

      .tabs ul{
        li {
          width: 100%;
          text-align: center;
        }
        li:first-child::after {
          display: none;
        }
      }
    }
  }

}

div[data-page=dashboard] {
  .l-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    background: #f5f4f4;

    .l-h {
      border-bottom: 1px solid #45cb5e;
      background: #3fbc6c;
      .g-logo {
        height: 71px;
        background: url(../images/cuts.png) -30px -224px;
      }
    }

    .l-nav {
      position: absolute;
      left:0;
      right: 0;
      top: 71px;
      bottom: 0;
      border-right: 1px solid #e5e5e7;
      background: #f2f2f2;
    }
  }
  .r-header {
    position: absolute;
    left: 260px;
    right: 0;
    top: 0;
    height: 71px;
    border-bottom: 1px solid #e5e5e7;
    background: #f8f8f8;

    .sys-loc {
      position: absolute;
      top: 10px;
      left: 30px;
      color: #666666;
      font-size: 12px;

      .split {
        display: inline-block;
        padding: 0 3px;
      }
      .part:last-child .split {
        display: none;
      }
    }

    .page-title {
      margin-top: 32px;
      text-align: center;
      line-height: 28px;

      .title {
        display: inline-block;
        font-size: $font-size-large;
      }
      .title::before, .title::after {
        content: ' ';
        display: inline-block;
        position: relative;
        top: 3px;
        width: 0;
        height: 0;
        height: 18px;
        border-left: 2px solid #3fbc6c;
      }
      .title::before {
        margin-right: 8px;
      }
      .title::after {
        margin-left: 8px;
      }
    }

    .sys-bell {
      position: absolute;
      right: 30px;
      top: 10px;
      font-size: 12px;
    }
    .sys-bell::before {
      content: ' ';
      display: inline-block;
      width: 18px;
      height: 18px;
      position: relative;
      top: 3px;
      margin-right: 5px;
      background: url(../images/cuts.png) -282px -306px;
    }
    .sys-bell[data-has=true]::before {
      background-position: -254px -306px;
    }
  }
  .r-page {
    position: absolute;
    left: 260px;
    right: 0;
    top: 71px;
    bottom: 0;
    padding: 20px 30px;
    background: #fff;
    overflow: auto;

    >div{
      min-width: 1000px;
    }
  }
}

ul.menu {
  .item {
    .title {
      margin-top: 15px;
      height: 42px;
      line-height: 42px;
      font-size: $font-size-normal;
      border-left: 6px solid transparent;

      span{
        margin-left: 8px;
      }
    }
    .title:hover {
        background: #d3dadc;
    }

    div[data-icon]::before {
      margin-left: 30px;
      margin-right: 10px;
    }
    
    .title::after {
      color: #a5a5a5;
      font-size: 12px;
      font-family: "anticon" !important;
      font-style: normal;
      vertical-align: baseline;
      text-align: center;
      text-transform: none;
      text-rendering: auto;
      position: absolute;
      -webkit-transition: -webkit-transform .3s ease;
      transition: -webkit-transform .3s ease;
      transition: transform .3s ease;
      transition: transform .3s ease, -webkit-transform .3s ease;
      content: "\E61D";
      right: 16px;
      -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";
      -webkit-transform: rotate(270deg) scale(0.75);
      -ms-transform: rotate(270deg) scale(0.75);
      transform: rotate(270deg) scale(0.75);
    }
  }

  .item[data-active=true]>.title {
    border-left: 6px solid #2dbe60;
    background: #d3dadc;
  }

  .item[data-open=true] {
    .sub-menu{
      display: block;
    }
  }
  

  .sub-menu{
    display: none;

    .title {
      font-size: $font-size-small;
      height: 36px;
      line-height: 36px;
    }
    .sub-item[data-active=true] {
      background: #d3dadc;
    }
  }
}

div[data-icon]::before {
  content: ' ';
  display: inline-block;
  width: 18px;
  height: 18px;
  position: relative;
  top:3px;
  background: url(../images/cuts.png);
}
div[data-icon=vehicle]::before {
  background-position: -30px -306px;
}
div[data-icon=model]::before {
  background-position: -58px -306px;
}
div[data-icon=monitor]::before {
  background-position: -86px -306px;
}
div[data-icon=service]::before {
  background-position: -114px -306px;
}
div[data-icon=provider]::before {
  background-position: -142px -306px;
}
div[data-icon=analyze]::before {
  background-position: -170px -306px;
}
div[data-icon=employee]::before {
  background-position: -198px -306px;
}

div[data-icon=location]::before {
  background-position: -226px -306px;
}

.group-title {
  .title, .description {
    display: inline-block;
  }
  .title {
    font-size: 20px;
    font-weight: 600;
  }
  .description {
    margin-left: 10px;
    color: #aaaaaa;
    font-size: 14px;
    vertical-align: bottom;
  }
}

.shortcut {
  cursor: pointer;
  position: relative;
  height: 142px;
  border: 1px solid #e5e5e7;
  box-shadow: $box-shadow-base;
  transition: all 0.3s;

  .label {
    position: absolute;
    top: 30px;
    left: 0;
    width: 100%;
    font-size: 18px;
    text-align: center;

    .cn {
      margin-top: -3px;
    }

    .en {
      color: #888;
      font-size: 12px;
      margin-top: -3px;
    }
  }
  .label::before {
    width: 46px;
    height: 46px;
    background-position: -30px -418px;
  }
}
.shortcut:hover::after {
  content: '';
  position: absolute;
  top: 8px;
  left: 8px;
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: #3fbc6c;
}
.shortcut::before, .shortcut .label::before {
  content: '';
  display: inline-block;
  background-image: url(../images/cuts.png);
}
.shortcut::before {
  width: 120px;
  height: 96px;
  position: absolute;
  right: 0;
  bottom: 0;
  background-position: -30px -474px;
}
.shortcut[data-type=newVehicle]::before {
  background-position: -30px -474px;
}
.shortcut[data-type=newVehicle] {
  .label::before {
    background-position: -30px -418px;
  }
}
.shortcut[data-type=newModel]::before {
  background-position: -160px -474px;
}
.shortcut[data-type=newModel] {
  .label::before {
    background-position: -86px -418px;
  }
}
.shortcut[data-type=realtime]::before {
  background-position: -290px -474px;
}
.shortcut[data-type=realtime] {
  .label::before {
    background-position: -142px -418px;
  }
}
.shortcut[data-type=addService]::before {
  background-position: -420px -474px;
}
.shortcut[data-type=addService] {
  .label::before {
    background-position: -198px -418px;
  }
}
.shortcut[data-type=invite]::before {
  background-position: -550px -474px;
}
.shortcut[data-type=invite] {
  .label::before {
    background-position: -254px -418px;
  }
}
.shortcut[data-type=settings]::before {
  background-position: -680px -474px;
}
.shortcut[data-type=settings] {
  .label::before {
    background-position: -310px -418px;
  }
}
.shortcut[data-type=addProvider]::before {
  background-position: -810px -474px;
}
.shortcut[data-type=addProvider] {
  .label::before {
    background-position: -366px -418px;
  }
}
.shortcut[data-type=vehicleAnalysis]::before {
  background-position: -940px -474px;
}
.shortcut[data-type=vehicleAnalysis] {
  .label::before {
    background-position: -422px -418px;
  }
}
.shortcut[data-type=servicesAnalysis]::before {
  background-position: -1070px -474px;
}
.shortcut[data-type=servicesAnalysis] {
  .label::before {
    background-position: -478px -418px;
  }
}
.shortcut[data-type=alarmAnalysis]::before {
  background-position: -1200px -474px;
}
.shortcut[data-type=alarmAnalysis] {
  .label::before {
    background-position: -534px -418px;
  }
}
.shortcut[data-type=userInfo]::before {
  background-position: -1330px -474px;
}
.shortcut[data-type=userInfo] {
  .label::before {
    background-position: -590px -418px;
  }
}
.shortcut[data-type=settings] {
  color: #fff;
  background: #3fbc6c;
  border-color: #1d9649;
  .cn,.en {
    color: #fff;
  }
}
.shortcut:hover {
  border-color: #2dbe60;
}
.shortcut-settings {
  width: 251px;

  .ant-checkbox-group-item:nth-child(odd) {
      width: 120px;
      margin-left: 20px;
  }
}
.panel {
  border: 1px solid #e5e5e7;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}
.list {
  border: 1px solid #e5e5e7;
  a {
    text-decoration: underline;
  }
  .header {
    padding: 0 30px 0 20px;
    height: 52px;
    line-height: 52px;
    background: #767f84;
    border-bottom: 1px solid #e5e5e7;

    .title {
      color: #fff;
      font-size: 16px;
    }
    .description {
      color: #c2c6c8;
      font-size: 14px;
      margin-left: 10px;
    }
    a {
      color: #fff;
    }
  }
  .l-row {
    position: relative;

    .ct {
      margin: 0 0 0 58px;
      padding: 15px 30px 12px 0;
      border-bottom: 1px solid #e5e5e7;
      font-size: 12px;

      .title {
        font-size: 16px;
      }
      .time {
        color: #999;
        float: right;
      }
      .msg {
        line-height: 28px;
      }
      .mark {
        float: right;
        font-size: 12px;
      }
    }
  }

  .l-row::before {
    content: ' ';
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 4px;
    position: absolute;
    top: 24px;
    left: 42px;
    background: #767f84;
  }
  .l-row[data-type=sys]::before {
    background: #3fbc6c;
  }
  .l-row[data-type=service]::before {
    background: #f8cd36;
  }
  .l-row[data-type=invite]::before {
    background: #444444;
  }
  .l-row:nth-child(odd) {
    background: #f4f8f9;
  }
  .l-row:last-child .ct {
    border: none;
  }
}

.tags-panel {
  width: 288px;
  padding: 10px 20px;
  
  .ant-input, .ant-input-preSuffix-wrapper {
    display: inline-block;
    width: 100%;
  }
}

.ant-dropdown-placement-bottomLeft {
  .table-filter {
    left: -50%;
    margin-left: 12px;
  }
}

.ant-dropdown-placement-bottomRight {
  .table-filter {
    right: -50%;
    margin-right: 12px;
  }
  
}
.table-filter {
  position: relative;
  top: 16px;
  padding-top: 6px;
  min-width: 300px;
  background: transparent;

  .inner {
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
    background: transparent;
  }

  .title {
    position: relative;
    color: #fff;
    text-align: center;
    height: 30px;
    line-height: 30px;
    background: #2dbe60;
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
    border-bottom: 1px solid #e7e7e7;
  }

  .title:before {
    content: ' ';
    display: block;
    position: absolute;
    top: -12px;
    left: 50%;
    margin-left: -6px;
    width: 0;
    height: 0;
    border: 6px solid transparent;
    border-bottom-color: #2dbe60;
  }

  .content {
    padding: 10px 30px;
    background: #fff;
    border-bottom-left-radius: 3px;
    border-bottom-right-radius: 3px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);

    .ant-checkbox-wrapper:not(:last-child) {
      margin-right: 0;
    }
    .ant-checkbox-group-item {
      display: block;
      margin-bottom: 8px;
    }
    .ant-checkbox-group-item:last-child {
      margin-bottom: 0;
    }
    .ant-calendar-picker {
      display: block;
    }

    .multiple-cbox {
      width: 260px;
      padding: 0 20px;
      .ant-checkbox-group-item {
        display: inline-block;
      }

      .ant-checkbox-group-item:nth-child(odd) {
        width: 60%;
      }
    }
  }
}

.title {
  font-size: 18px;
}

.detail-panel {
  font-size: 14px;
  border: $border-base;
  box-shadow: $box-shadow-base;

  .header {
    padding: 10px 30px;
    color: #fff;
    font-size: 16px;
    background: #767f84;
  }

  .body {
    .ant-row {
      border-bottom: $border-base;

      .item {
        padding: 10px 30px;
        display: table;
        border-right: $border-base;

        .label, .value {
          display: table-cell;
        }
        .value {
          text-align: right;
        }
      }

      .item:last-child {
        border: none;
      }
    }

    .ant-row:nth-child(even) {
      background: #fafafa;
    }
    .ant-row:last-child {
      border: none;
    }
  }
}

.ant-btn.gray {
  background: #ebebeb;
}

.upload-item {
  border: 1px solid #dedede;
  width: 180px;
  height: 120px;
  border-radius: 6px;
  background-color: #fbfbfb;
  transition: border-color 0.3s ease;
  display: inline-block;
  margin-right: 8px;
  margin-bottom: 8px;
  position: relative;
  overflow: hidden;

  img {
    width: 100%;
    border-radius: 3px;
  }

  .upload-item-oprs{
    position: absolute;
    right: 0;
    bottom: 0;
    text-align: right;
    line-height: 20px;

    .opr {
      display: inline-block;
      position: relative;
      color: #fff;
      background: #2dbe60;
      font-size: 12px;
      padding: 0 10px;
      cursor: pointer;
    }
    .opr:first-child {
      border-top-left-radius: 5px;
    }
    .opr:last-child {
      border-bottom-right-radius: 5px;
    }
    .opr::after {
      content: ' ';
      width: 0;
      height: 12px;
      position: absolute;
      right: 0px;
      top: 5px;
      border-right: 1px solid #1d9649;
    }
    .opr:last-child::after {
      display: none;
    }
  }
}

.form-card {
  float: left;
  width: 450px;
  margin: 0 30px 30px 0;
  border: 1px solid #dedede;

  .title {
    color: #fff;
    background: #767f84;
    padding: 6px 30px;
    border-bottom: 1px solid #dedede;

    .ant-btn {
      float: right;
      color :#fff;
      background: transparent;
      border-color: transparent;
    }
  }
  .body {
    padding: 10px 0;
  }
}

.login-user {
  width: 100%;
  height: 90px;
  position: absolute;
  bottom: 0;
  left: 0;
  border-top: 1px solid #dedede;

  .info{
    margin-top: 22px;
    height: 46px;
    .txt {
      font-size: 16px;
      position: absolute;
      left: 90px;
      top: 32px;
    }
  }

  .info::before {
    content: ' ';
    display: inline-block;
      width: 46px;
      height: 46px;
      margin-left: 30px;
      background: url(../images/cuts.png) -30px -362px;
  }

  
}